package com.xmh.datasource.demo.health;

import com.xmh.datasource.demo.config.DataSourceProperties;
import org.springframework.boot.actuate.health.AbstractHealthIndicator;
import org.springframework.boot.actuate.health.Health;
import org.springframework.jdbc.core.JdbcTemplate;

public class JdbcHealthIndicator extends AbstractHealthIndicator {

    private final JdbcTemplate jdbcTemplate;

    private final DataSourceProperties dataSourceProperties;

    public JdbcHealthIndicator(JdbcTemplate jdbcTemplate, DataSourceProperties dataSourceProperties) {
        this.jdbcTemplate = jdbcTemplate;
        this.dataSourceProperties = dataSourceProperties;
    }

    @Override
    protected void doHealthCheck(Health.Builder builder) throws Exception {
        String sql = "select version() version ";


    }
}
